package com.kuaiditu.assistant.api.xz_api.xz_encode;

import java.security.MessageDigest;

/**
 * Created by Eenie on 2017/8/15.
 * Email: eeniework@gmail.com
 * Des:
 */

public class CommonSecretUtil {

    public static String getKey(String var0) {
        return encode(var0, "UTF8");
    }

    public static String encode(String var0, String var1) {
        try {
            MessageDigest var2 = MessageDigest.getInstance("MD5");
            var2.update(var0.getBytes(var1));
            var0 = new String(a.a(var2.digest()));
            return var0;
        } catch (Exception var3) {
            throw new RuntimeException("数据加密出现异常!", var3);
        }
    }


}
